package com.ymatou.iapi.shoppingcartservice.service;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import com.ymttest.business.YmatouAutoTestCall;
import com.ymttest.utils.EnvSetup;

public class ShoppingcartProductGetInfoListByIdsCall extends YmatouAutoTestCall{
	
	private static String opurl="/api/shoppingcart/getinfolistbyids";
	
	public ShoppingcartProductGetInfoListByIdsCall(){
		super(EnvSetup.getSystemUrl("shoppingcartservice"), opurl, "POST", "JSON");
	}

	@Override
	public void addDefHeader(){
		client.addHeader("Content-Type", "application/json");
	}
	
	public JSONArray getList(JSONObject o) {
		
		JSONArray list = new JSONArray();
		
		try {
			list = o.getJSONArray("list");
		} catch (JSONException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		return list;
	}
}
